var q = 0,q1 = 0;
    var d = document.getElementById('dian1');
    var d1 = document.getElementById('dian2');
    var inf= document.getElementById('info');
    var inf1= document.getElementById('info1');
    var inf2= document.getElementById('info2');
    var inf3= document.getElementById('info3');
//===========================================下拉菜单收缩========================
d.onclick = function(){
    var _d1 = document.getElementById('_d1');
    if(q==0){
        _d1.style.height = "112px";
        _d1.style.borderBottom="1px solid #10A4AE";
        d.style.background="url(images/bg3.png) 95%  no-repeat ";
        q=1;
    }else if(q==1){
        _d1.style.height = "35px";
        _d1.style.borderBottom="1px solid #ccc";
        d.style.background="url(images/bg4.png) 95% no-repeat ";
        q=0;
    }

};
d1.onclick = function(){
    var _d2 = document.getElementById('_d2');
    if(q1==0){
        _d2.style.height = "112px";
        _d2.style.borderBottom="1px solid #10A4AE";
        d1.style.background="url(images/bg3.png) 95%  no-repeat ";
        q1=1;
    }else if(q1==1){
        _d2.style.height = "35px";
        _d2.style.borderBottom="1px solid #ccc";
        d1.style.background="url(images/bg4.png) 95% no-repeat ";
        q1=0;
    }


};

//======================================鼠标点中下拉菜单的颜色=====================
var _backg = document.getElementsByClassName('_backg');
for(var i = 0;i<_backg.length;i++){
    _backg[i].onclick = function(){
        for(var i = 0;i<_backg.length;i++){
            _backg[i].style.background = "transparent";
        }
        this.style.background = "#7cf8fd";
    }
}


//    inf.onclick = function(){
//        inf.style.background = "#7cf8fd";
//        inf1.style.background = "";
//        inf2.style.background = "";
//        inf3.style.background = "";
//    };
//    inf1.onclick = function(){
//        inf.style.background = "";
//        inf1.style.background = "#7cf8fd";
//        inf2.style.background = "";
//        inf3.style.background = "";
//    };
//    inf2.onclick = function(){
//        inf.style.background = "";
//        inf1.style.background = "";
//        inf2.style.background = "#7cf8fd";
//        inf3.style.background = "";
//    };
//    inf3.onclick = function(){
//        inf.style.background = "";
//        inf1.style.background = "";
//        inf2.style.background = "";
//        inf3.style.background = "#7cf8fd";
//    };



//====================================添加学生===================================
document.getElementById('tianjia').onclick = function(){
   document.getElementById('meng5').style.display = "block";
   document.getElementById('tj').style.transform="scale(1.0)";
};
//===============================取消添加====================================
document.getElementById('qu').onclick = function(){
    document.getElementById('tj').style.transform="scale(0.0)";
    document.getElementById('meng5').style.display = "none";

};


var t1 = document.getElementById('_t1').value;
var t2 = document.getElementById('_t2').value;
var t3 = document.getElementById('_t3').value;
var t4 = document.getElementById('_t4').value;
var t5 = document.getElementById('_t5').value;
//======================== 添加学生的蒙尘================================
document.getElementById('que').onclick = function(){
    if(t1==""||t2==""||t3==""||t4==""||t5==""){
        document.getElementById('meng').style.display = "block";
        document.getElementById('tj').style.transform="scale(0.0)";
        document.getElementById('meng5').style.display = "none";
    }else{
        //document.getElementById('tj').style.display = "none";
    }
};
document.getElementById('que1').onclick = function(){
    document.getElementById('meng').style.display = "none";
};
//==================================查看信息=============================
document.getElementById('cha').onclick = function(){
        document.getElementById('meng2').style.display = "block";
};
document.getElementById('que2').onclick = function(){
    document.getElementById('meng2').style.display = "none";
};
//=============================================删除信息==========================
document.getElementById('cha1').onclick = function(){
    document.getElementById('meng3').style.display = "block";
};
document.getElementById('que3').onclick = function(){
    document.getElementById('meng3').style.display = "none";
};
//=============================================修改信息==========================
document.getElementById('cha2').onclick = function(){
    document.getElementById('meng4').style.display = "block";
};
document.getElementById('que4').onclick = function(){
    document.getElementById('meng4').style.display = "none";
};